import { delay } from 'roadhog-api-doc';
import Mock from 'mockjs';
export default delay(
  {
    'Get /umi/goods': [
      {
        price: "100.00",
        name: "西红柿",
        id: '001'
      },
      {
        price: "12.00",
        name: "白菜",
        id: '002'
      }
    ],
    'Post /umi/list': (req, res) => {
      res.send(
        Mock.mock({
          'data|1': [
            {
              code: 0,
              data: { ...req.body, a: 2 },
              msg: 'success'
            },
            {
              code: 1,
              msg: 'fail'
            }
          ]
        }).data,
      );
    }
  },
  2000
);